package oa.hleast.common.utils;

import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@Slf4j
public class ImagerListUtil {

    public static List<String> conversionToList(String imagerUrl) {
        if (StrUtil.isEmpty(imagerUrl)) {
            return new ArrayList<>();
        }

        log.info("imagerUrl = {} ", imagerUrl);
        return Arrays.stream(imagerUrl.split(",")).filter(StrUtil::isNotEmpty).collect(Collectors.toList());
    }
}
